package pw.hais.braintwists.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import pw.hais.braintwists.R;
import pw.hais.braintwists.app.BaseActivity;
import pw.hais.braintwists.model.User;
import pw.hais.utils.SPUtils;

/**
 * 启动页面
 */
public class StartActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);

        getSupportActionBar().hide();

        app.user = SPUtils.getObject("User", User.class);

        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                startActivity(new Intent(context,MainActivity.class));
                finish();
            }
        },2*1000);
    }
}
